
<mat-form-field class="example-full-width">
    <input #bookName matInput placeholder="图书名称">
    <mat-icon matSuffix (click)="add(bookName.value);bookName.value=''">add</mat-icon>
</mat-form-field>
<mat-list>
    <mat-list-item *ngFor="let book of books">
        <a routerLink="/detail/{{book.id}}">{{book.name}}</a>
        <mat-icon (click)='delete(book)'>delete</mat-icon>
    </mat-list-item>
</mat-list>


